import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

const state = {
    activeNav: {
        title: 'Mystery'
    },
    bottomNavIsShow: true
};

const getters = {
    activeNavTitle: (state) => {
        return state.activeNav.title;
    },
    bottomNavIsShow: (state) => {
        return state.bottomNavIsShow;
    }
}

const mutations = {
    SET_ACTIVE_NAV_TITLE(state, title) {
        state.activeNav.title = title
    },
    SET_BOTTOM_NAV_SHOW(state, bool) {
        state.bottomNavIsShow = bool
    }
}

export default new Vuex.Store({
    getters,
    state,
    mutations
});
